package com.jieao.content.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jieao.content.domain.Diary;
import com.jieao.content.dto.DiaryDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface DiaryMapper extends BaseMapper<Diary> {

    List<DiaryDto> selectDiaryList(DiaryDto diary);

    List<DiaryDto> selectFrontDiaryList(DiaryDto diary);

    DiaryDto selectDiaryById(@Param("diaryId") Long diaryId, @Param("userId") Long userId);

    int change(DiaryDto catalog);

    List<DiaryDto> selectDiaryTreeList(DiaryDto catalog);

    int deleteDiaryById(Long diaryId);

    List<Map<String,Object>> getTimeData(@Param("catalogId") Long catalogId);
}
